package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.ShopService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/shop")
@Slf4j
public class ShopController {
	
	private final ShopService shopService;
	
	public ShopController(ShopService shopService) {this.shopService = shopService;}
	
	@GetMapping("/status")
	public Result<Integer> getShopStatus() {
		return shopService.getShopStatus();
	}
	
	@PutMapping("{status}")
	public Result setShopStatus(@PathVariable Integer status) {
		return shopService.setShopStatus(status);
	}
}
